﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/Site.Master" AutoEventWireup="true" CodeBehind="Contact.aspx.cs" Inherits="YerongapillyGreens.Web.Pages.Contact" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>Contact us</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceholder" runat="server">
    <div style="padding: 20px" class="whiteBG grid">
        <div class="row">
            <div class="col-md-4 whiteBG">
                <input type="text" id="txtName" placeholder="Name (required)" runat="server" 
                    class="form-control" />  
                <asp:RequiredFieldValidator ID="validateName" runat="server" SetFocusOnError="true"
                    ControlToValidate="txtName" CssClass="validationError" Display="Dynamic" ErrorMessage="Please enter a valid name" />
                
                <br />
                <input type="text" id="txtEmail" placeholder="Email (required)" runat="server" class="form-control" />
                <asp:RequiredFieldValidator ID="validateEmail" runat="server" SetFocusOnError="true"
                    ControlToValidate="txtEmail" CssClass="validationError" Display="Dynamic" ErrorMessage="Please enter a valid email" />
                <asp:RegularExpressionValidator ID="validateEmailRegex" runat="server" SetFocusOnError="true"
                    ControlToValidate="txtEmail" CssClass="validationError" 
                    ErrorMessage="Please enter a valid email" Display="Dynamic"
                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" />

                <br />
                <input type="text" id="txtPhone" placeholder="Phone" runat="server" 
                    class="form-control" />
                
                <br />
                <label class="checkbox-inline"><input type="checkbox" id="chkSales" runat="server">Sales</label>
                <label class="checkbox-inline"><input type="checkbox" id="chkRent" runat="server">Rent</label>

                <br />
            </div>
            <div class="col-md-6 whiteBG">
                <textarea id="txtMessage" placeholder="Message (required)" runat="server" rows="8"
                    class="form-control" />
                <asp:RequiredFieldValidator ID="validateMessage" runat="server" SetFocusOnError="true"
                    ControlToValidate="txtMessage" CssClass="validationError" Display="Dynamic" ErrorMessage="Please enter a message" />
                <br />
                <asp:Button ID="btnSubmit" runat="server" type="button" class="btn btn-primary btn-md btnSubmit" 
                    Text="Submit" />
                <br />
                <br />
                <div class="alert alert-success" role="alert" id="msgSentDiv" runat="server" visible="false">
                    Message sent!
                </div>
                <div class="alert alert-danger" role="alert" id="msgErrorDiv" runat="server" visible="false">
                    Oh oh! Something went wrong here. Please try again or if you have already tried please call us.
                </div>
            </div>
        </div>
    </div>
    
    <br />
    <br />
    &nbsp;
    <script language="javascript" type="text/javascript">
        $("form").submit(function (e)
        {
            if  (typeof (Page_ClientValidate) == 'function') 
                Page_ClientValidate();
        
            if (Page_IsValid)
                $(".btnSubmit").val('Sending...Please wait');
        });
    </script>
</asp:Content>
